1. Field of the Invention
The present invention relates to a communication apparatus and method.
2. Description of the Related Art
In recent years, many devices having a wireless function, represented by an 802.11 wireless LAN, are introduced commercially.
For communication using a wireless LAN, it is necessary to set, in a device, wireless communication parameters such as a network identifier (SSID), encryption scheme, encryption key, authentication scheme, and authentication key. These wireless communication parameters are normally set using the user interface of the device. However, this setting operation is cumbersome. Especially with devices such as a digital camera or a printer, it is difficult to input the character string of a network identifier or an encryption key.
There is also implemented a system recently, which causes devices to directly communicate with each other by a wireless LAN without intervening any access point, i.e., communicate in a so-called ad hoc network. Even in such an ad hoc network, a method of easily setting wireless communication parameters between devices is demanded.
In techniques recently proposed by patent references mentioned below, wireless communication devices are directly connected via, e.g., a cable, and wireless communication parameters held by one device are transferred to the connected counterpart.
U.S. Pre-Granted Publication No. 2002/0147819 (Japanese Patent Laid-Open No. 2002-359623)
U.S. Pre-Granted Publication No. 2004/0198430 (Japanese Patent Laid-Open No. 2002-312155)
There is a requirement for a technique of implementing such wireless parameter transfer by wireless communication.
However, if a third, undesirable device exists in the communication range of two devices which should transfer and set parameters by wireless communication, the wireless parameter setting may be done in the third device.
For example, assume that two sets of devices (digital camera A and printer A, and digital camera B and printer B) which are going to set wireless parameters are within communication range of each other. Each device is set in a wireless parameter setting mode by a user operation so that parameter transfer and parameter setting by wireless communication are done.
If the four devices almost simultaneously shift to the wireless parameter setting mode, digital camera A may set the parameters not in printer A but in printer B depending on timing.